import moment from 'moment';
import { ymdhms } from 'configs/constants';
import { formatValue } from 'utils/share';

export default [
  {
    title: '用户名',
    dataIndex: 'username',
    render: (value) => formatValue(value)
  },
  {
    title: '邮箱',
    dataIndex: 'email',
    render: (value) => formatValue(value)
  },
  {
    title: '年龄',
    dataIndex: 'age',
    render: (value) => formatValue(value)
  },
  {
    title: '创建时间',
    dataIndex: 'created_at',
    render: (val) => moment(val).format(ymdhms)
  },
  {
    title: '更新时间',
    dataIndex: 'updated_at',
    render: (val) => moment(val).format(ymdhms)
  }
];
